package com.glp.work.flow.service;


import com.glp.common.reponse.BaseResult;
import com.glp.work.flow.dto.CashMessageDTO;
import com.glp.work.flow.dto.request.CashMessageRequestDTO;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface CashMessageService {
    /**
     * @param msg
     * @return int
     * @throws Exception
     */
    int create(CashMessageDTO msg) throws Exception;

    /**
     * @param msg
     * @return int
     * @throws Exception
     */
    int edit(CashMessageDTO msg);

    /**
     * @param dto
     * @return List<CashMessage>
     * @throws Exception
     */
    BaseResult queryByUserId(CashMessageRequestDTO dto) throws Exception;

    List<CashMessageDTO> queryByUserId(String userId) throws Exception;

    BaseResult queryUnreadByUserId(String userId);

    Boolean edit(String userId);

    List<CashMessageDTO> queryByUserIdAndPull(CashMessageDTO dto) throws Exception;

    String queryUnreadMsgByUserId(String userId);

    void websocketEditList(List<CashMessageDTO> dto, String userId);

    Long queryUnreadMsgNumberByUserId(String userId);

}
